home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
tdbredit.zip
/
README.TXT
< prev
next >
Wrap
Text File
|
1996-09-19
|
7KB
|
128 lines
Here we are again
You just downloaded the version 1.2 of TDBRichEdit. A Delphi component which lets you edit
text inside a richedit control with some (not all yet) textformatting capabilities and save this text
directly into a database.
Installation
Install this component like any other delphi component. Copy the files tdbredi.pas and tdbredit.res
into the same directory at your harddisk, choose the menu item "Component / Install", click the
"Add" button and choose the TDBREdit.pas or TDBREdit.dcu. Then click "OK". The component
will be installed into the DataControl page. If you have installed another language this component
will be installed in the language specific page.
Usage
The only things you have to do is defining a Blobfield (formatted memo for paradox) in your
database to which you connect the TDBRichEdit control via its properties Datasource and
Datafield and selecting a language via the property Language. Everything else happens
automatically unless you don┤t want to use any of the extended features which are described
below. Normally you can edit your text which is loaded from the database and format it by
rightclicking the mouse and selecting of one of the formatting styles offered in the upcoming
popup menu or by using one of the shortcuts listed below.
English German
Ctrl-B Bold Strg-F Fett
Ctrl-I Italic Strg-K Kursiv
Ctrl-U Underline Strg-U Unterstrichen
Ctrl-O Strikeout Strg-G Durchgestrichen
Ctrl-F Font-Dialog Strg-I Schrift-Dialog
Ctrl-P Print Strg-D Drucken
Extended features:
Language support
This control supports the english and german language. You just select the language you are
programming in via the property language. Then you get the correct texts in the popup menu, the
hint panel, you can use the language specific shortcuts for the formatting styles and you get the
correct bitmap in your toolbar (see below). If you would like to support another language you can
easily adapt the sourcecode or send the texts and bitmaps to me. I will then include them into this
control.
Printing
You can print the content of the RichEdit control via the context sensitive menu which open after
a right mouse click or via a toolbar button (see below). The property PrintCaption gives you the
possibility to enter a string which is displayed by the print manager of Windows while the print job
is spooled and printed.
Toolbar with speedbuttons
You can define a toolbar (Tpanel-Object) in which the TDBRichEdit will display speedbuttons for
bold, italic, underlined and striked out text as well as a button for the font dialog. To use this
feature just select one of the offered panels in the property Toolbar. If you don┤t have any panel in
your form you can┤t use this feature. By selecting one of values ShButAlways or ShButOnEnter
of the property ShowButtons you can define if the speedbuttons should be displayed all the time
your TDBRichEdit is alive or only if it gets the focus. If you choose the second way the
speedbuttons will be deleted when the control looses the focus.
Speedbuttons in Floating window
Another way to show the speedbuttons is by setting the property ShowFloatingWindow to true.
In this case every time the TDBRichEdit control gets the focus a floating window, which contains
the above described speedbuttons, will be created and display above the left corner of the control.
This window will be destroyed when the control looses the focus. The value of this property will
be ignored if you┤ve already defined a toolbar.
Select speedbuttons you need
To Select the speedbuttons you need (e.g. only bold and italic) just select them with the property
VisibleBtns.
Joker, text macros
Another interesting feature is to use Joker (text macros). By filling the stringlist of the property
Jokerlist you define Joker which can be replaced at runtime with another text. The syntax for the
property Jokerlist is:
Joker=Value
where Joker is the text macro and value is the text with which the joker will be replaced.
For example: NAME=Helmut Tammen.
The statements must be separated by a carriage return, line feed or in other words one Stringlist
item for each joker statement.
The text of your TDBRichEdit control (which your customer entered) could than look like this:
"My name is {NAME}".
The parenthesis are very important. They are the indicators for a Joker. Every string that is
included in parenthesis is searched in the jokerlist and replaced by the defined value.
To replace the joker at runtime call the public procedure TDBRichEdit.ToggleJoker. This
procedure doesn┤t take any parameters. After calling this function the above entered text is
changed to "My name is Helmut Tammen". If you toggled to this "view mode" you cannot edit the
text. Every time a new record of the database is selected the control returns to the "joker mode".
In addition there is a new event OnJokerstateChanged which is called everytime the Jokerstate
changes. Here you can for example toggle the text of the button which you created to toggle the
joker mode.
To get the current jokerstate there is the "readonly and only at runtime" property Jokerstate
which returns stJoker if the Jokers are displayed and stValue if the values are currently displayed.
License
This component is freeware. You are allowed to give this tool (the .DCU and all documentation
files) to third people. But you are not allowed to give the source code to any other.
Registration
If you like this control or/and you would like to get the source code please register it for the price
of $10 (US). To do so just GO SWREG. The registration-ID is: #13089.
If you register you will not only get the source code but also the next version free of any charge.
Notice: At the moment I only distribute this software via Compuserve. But if you are interested in
this component and would like another way of distribution contact me via e-mail (see below).
The more people register the more will I be motivated to do further development.
Disclaimer
When I wrote this software I tried to do no programming errors and I and some other
programmers tested it. But I can┤t guarantee that this component is free of bugs. So you should
know that you use this software as it is. In spite of this you should also know that I try to fix all
the bugs that are reported to me.
What does the future bring
For the future I┤ve planned the following features:
Implementing paragraph formatting (Enumeration, indentation, alignment, ...).
Implementing tabs and a ruler.
Enhancement of the joker implementation (creating pattern letters).
Including OLE Objects.
Writing a help file.
Implementation of the new component RichEdit-View which encloses a ruler, a toolbar and
the RichEdit itself and should then look almost like a little text program.
If you have any suggestions or find any bugs please let me know. I will upload new versions
of this control from time to time.
I hope this control will help you
It┤s not the last version.
Helmut Tammen
Compuserve: 100712,3030
e-mail: 100712.3030@compuserve.com